// dlg.txt

//		mark_quest_dest(zone,x,y,layer,quest);
//		cancel_out_fight(0,short kill_enc);
//		make_outdoor_enc(short x,short y,short which_enc);
//		set_out_fight_field(short which_field);
// 				which_field is 0-20

begintalkscript;

variables;

short this_sec = 25;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "As you ascend into the upper reaches of the Low Dhaga, the land gradually becomes colder and more barren. You see the occasional tracks of scorpions and wolves, but only the fiercest Dhagans try to scrape out a living up here.";
	text2 = "Yet, there has been lots of movement up here. You occasionally stumble upon the tracks of raiders, heading south to cause havoc and fleeing north to recover and regroup. Also you can see a huge stone ruin in the distance.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "As barren as the heights of the Dhaga are, some madmen decided to build a city up here. Its ruins are old. There are the remnants of a wall and the crumbling shells of buildings, made of carefully carved marble and granite. You doubt anyone has lived here in earnest for centuries.";
	text2 = "Now it is a comfortable hiding place for wild beasts. Also, Dhagan workers. There are huge holes in the walls, where the downward folk have pulled out blocks of stones and carted them downhill to be used in new construction.";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "You are entering scorpion territory. You see the tracks and nests of the creatures everywhere, punctuated by the occasional shed carapace.";
	text2 = "What you don't see are the actual scorpions. They're here somewhere.";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "You find the stone halls of several clans of stoneworkers. They have been abandoned. They took up the miserable life of the refugee after the raiders began to attack in numbers.";
	text2 = "The buildings are empty, except for a few lonely bits of furniture.";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "You hear a few clicks around you, barely audible over the wind. Turning back, you are unsurprised to see scorpions. They have emerged from hiding places in the sand and are stalking you, hoping to corner you in the fields of boulders.";
	code =
		sf(100 + this_sec,5,1);
		make_outdoor_enc(271,115,0);
		make_outdoor_enc(277,116,1);
		make_outdoor_enc(280,114,0);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "An enormous scorpion rises out of the sand. Then another, and another, gravel and debris sliding off their enormous carapaces as they rise to meet you.";
	text2 = "These things are a genuine menace, the sort of prey a true hunter of the Rokaj dreams of finding. Defeating them should win you some glory.";
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "The scorpions have been defeated. You leave their remains to the wind and sand. Hopefully, nomads for decades to come will find the carapaces and wonder what amazing heroes achieved this victory.";
	code =
		ro_faction(2);
	break;
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "Now that the lizards are dead, the Ro warriors bandage their wounds and flee south to the safe haven of Etzae. They are poor men, hoping to win some needed glory in this expedition. Though they can't pay you for help, they promise that they will spread tales of your bold deed.";
	code =
		ro_faction(2);
	break;

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "There is a group of warriors wandering the wastes. When they see you, they turn and run toward you. You've been spotted by a raider patrol.";
	text2 = "There is a group of warriors wandering the wastes. When they see you, they turn and run away. They must be raiders who survived your assault on Ouachita Mountain, and they want to continue to survive.";
	code =
		if (gf(42,11) > 0) {
			rs(1);
			award_party_xp(20);
			cancel_out_fight(0,1);
			}
			else rs(2);
	break;
	
begintalknode;
	tag = 17;
	condition = 1;
	text1 = "You search the dead raiders, but you don't find any interesting information or treasure.";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You find a band of young Rokaj hunters. They were out hunting for big game, hoping to win some glory for themselves, and they found themselves outmatched.";
	text2 = "They stand in the middle of a crude campsite, surrounded by enormous reptiles. The lizards are closing in from all sides, hoping for some welcome variety in their diet.";
	text3 = "When the Ro warriors see you, they debate whether to ask for help. It would be shameful, after all. Then they decide that death isn't a better option. They shout for you to come help them.";
	code =
		set_out_fight_field(8);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Just leave.";
	text1 = "You back off into the sandy wastes. The warriors turn to their prey. They appear to be planning a desperate flight into the rocky desert to the west.";
	text2 = "You can't help but wish them well, though you know that, if they survive, their tales of your actions will not reflect well upon you.";
	action = END_TALK;
	code =
		ro_faction(-2);
		cancel_out_fight(0,1);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Help them!";
	text1 = "You barge through the circle of massive reptiles and join the young Ro. The presence of extra prey thrills the lizards. They attack immediately.";
	action = END_TALK;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				